package sanmubird.club.mock.service;


import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.TestConfiguration;
import org.springframework.boot.test.mock.mockito.SpyBean;
import org.springframework.context.annotation.Import;
import org.springframework.test.context.junit4.SpringRunner;

/**
 * @author sam
 * @date 2019/12/7 11:27
 * @description 功能描述
 */
@RunWith(SpringRunner.class)
public class MockDemoServiceTest2 {

	@TestConfiguration  // Configuration 也是可以的
	@Import(MockDemoService.class) // A @Component injected with ExampleService
	static class Config {
	}

	@SpyBean
	private MockDemoService mockDemoService;

	@Before
	public void setUp() throws Exception {
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test
	public void simpleService() {
		final String s = mockDemoService.simpleService();
		System.out.println(s);
	}


}
